#!/usr/bin/env python3
# -*- coding:utf-8 -*-
import sys
import subprocess

WIN = sys.platform.startswith('win')


def main():
    """主函数"""
    steps = [
        # "pytest --alluredir allure-results --clean-alluredir --reruns 2 --reruns-delay 1",
        "pytest tests/stocktrackpage/history/test_aco_filter.py::test_aco_filter_007 --alluredir allure-results --clean-alluredir",  #--reruns 3 --reruns-delay 2
        "allure generate allure-results -c -o allure-report",
        "allure open allure-report -h 127.0.0.1 -p 8000"

    ]
    for step in steps:
        # subprocess.run("call " + step if WIN else step, shell=True)
        subprocess.run(step)


if __name__ == "__main__":
    main()
